package kim.artemis.rpc.demo.client.configuration;


import kim.artemis.rpc.core.protocol.client.ArtemisRpcClientFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Slf4j
@Configuration
public class ArtemisConfiguration {

    /**
     * 注册中心
     */
    private String address = "192.168.0.102:2181";

    @Bean
    public ArtemisRpcClientFactory artemisRpcClientFactory () {
        ArtemisRpcClientFactory artemisRpcClientFactory = new ArtemisRpcClientFactory();
        artemisRpcClientFactory.setRegistry("Zookeeper");
        artemisRpcClientFactory.setAddress(address);
        return artemisRpcClientFactory;
    }


}
